package com.eastedu.report.service;

import com.eastedu.report.common.model.parameter.ReportExportParameter;
import com.eastedu.report.common.model.parameter.ReportGenerateParameter;
import com.eastedu.template.model.ReportResult;
import com.eastedu.template.model.SchoolReportFileData;

/**
 * The interface Report export task service.
 *
 * @author superman
 */
public interface ReportExportTaskService {
    /**
     * Create long.
     *
     * @param generateParameter the generate parameter
     * @return the long
     */
    ReportResult create(ReportGenerateParameter generateParameter);

    /**
     * Finish.
     *
     * @param taskId the task id
     * @param result the result
     */
    void finish(String taskId, ReportResult result);

    /**
     * Failure.
     *
     * @param taskId    the task id
     * @param throwable the throwable
     */
    void failure(String taskId, Throwable throwable);

    /**
     * Get report result.
     *
     * @param taskId the task id
     * @return the report result
     */
    ReportResult get(String taskId);

    /**
     * Get report result.
     *
     * @param parameter the parameter
     * @return the report result
     */
    SchoolReportFileData getReportForCompress(ReportExportParameter parameter);
}
